home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / Venus / MacHeaders.c < prev    next >
Text File  |  1996-06-22  |  5KB  |  200 lines

  1. /*
  2.  *    MacHeaders.c
  3.  *
  4.  *    Script to generate the 'MacHeaders<xxx>' precompiled header for Metrowerks C/C++.
  5.  *  Copyright © 1993 metrowerks inc.  All rights reserved.
  6.  */
  7.  
  8. /*
  9.  *    Required for c-style toolbox glue function: c2pstr and p2cstr
  10.  *    the inverse operation (pointers_in_A0) is performed at the end ...
  11.  */
  12.  
  13. #if !(powerc || __CFM68K__)
  14.  #pragma d0_pointers on
  15. #endif
  16.  
  17. /*
  18.  *    To allow the use of ToolBox calls which have now become obsolete on PowerPC, but
  19.  *    which are still needed for System 6 applications, we need to #define OBSOLETE.  If
  20.  *    your application will never use these calls then you can comment out this #define.
  21.  *    NB: This is only for 68K ...
  22.  */
  23.  
  24. #if !defined(powerc) && !defined(OBSOLETE)
  25.  #define OBSOLETE    1
  26. #endif
  27.  
  28. /*
  29.  *    Metrowerks-specific definitions
  30.  *
  31.  *    These definitions are commonly used but not in Apple's headers. We define
  32.  *    them in our precompiled header so we can use the Apple headers without modification.
  33.  */
  34.  
  35. #define PtoCstr        p2cstr
  36. #define CtoPstr        c2pstr
  37. #define PtoCString    p2cstr
  38. #define CtoPString    c2pstr
  39.  
  40. #define topLeft(r)    (((Point *) &(r))[0])
  41. #define botRight(r)    (((Point *) &(r))[1])
  42.  
  43. #define TRUE        true
  44. #define FALSE        false
  45.  
  46. #ifndef powerc
  47.  #include <MixedMode.h>
  48.  long GetCurrentA5(void)
  49.   ONEWORDINLINE(0x200D);
  50. #endif
  51.  
  52. /*
  53.  *    Apple #include files
  54.  *
  55.  *    Uncomment any additional #includes you want to add to MacHeaders.
  56.  */
  57.  
  58. //    #include <ADSP.h>
  59. //    #include <AEObjects.h>
  60. //    #include <AEPackObject.h>
  61. //    #include <AERegistry.h>
  62. //    #include <AEUserTermTypes.h>
  63. //    #include <AIFF.h>
  64.     #include <Aliases.h>
  65.     #include <AppleEvents.h>
  66. //    #include <AppleGuide.h>
  67. //    #include <AppleScript.h>
  68. //    #include <AppleTalk.h>
  69. //    #include <ASDebugging.h>
  70. //    #include <ASRegistry.h>
  71. //    #include <Balloons.h>
  72. //    #include <CMApplication.h>
  73. //    #include <CMComponent.h>
  74. //    #include <CodeFragments.h>
  75.     #include <ColorPicker.h>
  76. //    #include <CommResources.h>
  77. //    #include <Components.h>
  78.     #include <ConditionalMacros.h>
  79. //    #include <Connections.h>
  80. //    #include <ConnectionTools.h>
  81.     #include <Controls.h>
  82. //    #include <ControlStrip.h>
  83. //    #include <CRMSerialDevices.h>
  84. //    #include <CTBUtilities.h>
  85. //    #include <CursorCtl.h>
  86. //    #include <CursorDevices.h>
  87. //    #include <DatabaseAccess.h>
  88. //    #include <DeskBus.h>
  89.     #include <Devices.h>
  90.     #include <Dialogs.h>
  91. //    #include <Dictionary.h>
  92. //    #include <DisAsmLookup.h>
  93. //    #include <Disassembler.h>
  94. //    #include <DiskInit.h>
  95. //    #include <Disks.h>
  96. //    #include <Displays.h>
  97. //    #include <Drag.h>
  98. //    #include <Editions.h>
  99. //    #include <ENET.h>
  100. //    #include <EPPC.h>
  101. //    #include <ErrMgr.h>
  102.     #include <Errors.h>
  103.     #include <Events.h>
  104. //    #include <fenv.h>
  105.     #include <Files.h>
  106. //    #include <FileTransfers.h>
  107. //    #include <FileTransferTools.h>
  108.     #include <FileTypesAndCreators.h>
  109. //    #include <Finder.h>
  110. //    #include <FixMath.h>
  111.     #include <Folders.h>
  112.     #include <Fonts.h>
  113. //    #include <fp.h>
  114. //    #include <FragLoad.h>
  115. //    #include <FSM.h>
  116.     #include <Gestalt.h>
  117. //    #include <HyperXCmd.h>
  118. //    #include <Icons.h>
  119. //    #include <ImageCodec.h>
  120. //    #include <ImageCompression.h>
  121. //    #include <IntlResources.h>
  122. //    #include <Language.h>
  123.     #include <Lists.h>
  124.     #include <LowMem.h>
  125. //    #include <MachineExceptions.h>
  126. //    #include <MacTCP.h>
  127. //    #include <MediaHandlers.h>
  128.     #include <Memory.h>
  129.     #include <Menus.h>
  130. //    #include <MIDI.h>
  131.     #include <MixedMode.h>
  132. //    #include <Movies.h>
  133. //    #include <MoviesFormat.h>
  134. //    #include <Notification.h>
  135. //    #include <OSA.h>
  136. //    #include <OSAComp.h>
  137. //    #include <OSAGeneric.h>
  138.     #include <OSUtils.h>
  139.     #include <Packages.h>
  140. //    #include <Palettes.h>
  141. //    #include <Picker.h>
  142. //    #include <PictUtil.h>
  143. //    #include <PictUtils.h>
  144.     #include <PLStringFuncs.h>
  145. //    #include <Power.h>
  146. //    #include <PPCToolbox.h>
  147.     #include <Printing.h>
  148.     #include <Processes.h>
  149.     #include <QDOffscreen.h>
  150.     #include <Quickdraw.h>
  151. //    #include <QuickdrawText.h>
  152. //    #include <QuickTimeComponents.h>
  153.     #include <Resources.h>
  154. //    #include <Retrace.h>
  155. //    #include <ROMDefs.h>
  156. #ifndef powerc
  157. //    #include <SANE.h>
  158. #endif
  159.     #include <Scrap.h>
  160. //    #include <Script.h>
  161. //    #include <SCSI.h>
  162. //    #include <SegLoad.h>
  163. //    #include <Serial.h>
  164. //    #include <ShutDown.h>
  165. //    #include <Slots.h>
  166. //    #include <Sound.h>
  167. //    #include <SoundComponents.h>
  168. //    #include <SoundInput.h>
  169. //    #include <Speech.h>
  170.     #include <StandardFile.h>
  171. //    #include <Start.h>
  172.     #include <Strings.h>
  173. //    #include <Terminals.h>
  174. //    #include <TerminalTools.h>
  175.     #include <TextEdit.h>
  176. //    #include <TextServices.h>
  177.     #include <TextUtils.h>
  178. //    #include <Threads.h>
  179. //    #include <Timer.h>
  180.     #include <ToolUtils.h>
  181. //    #include <Translation.h>
  182. //    #include <TranslationExtensions.h>
  183.     #include <Traps.h>
  184. //    #include <TSMTE.h>
  185.     #include <Types.h>
  186. //    #include <Unmangler.h>
  187. //    #include <Video.h>
  188.     #include <Windows.h>
  189. //    #include <WorldScript.h>
  190.  
  191.  
  192. /*
  193.  *    required for c-style toolbox glue function: c2pstr and p2cstr
  194.  *    (match the inverse operation at the start of the file ...
  195.  */
  196.  
  197. #if !(powerc || __CFM68K__)
  198.  #pragma d0_pointers reset
  199. #endif
  200.